package com.stageadminserver.adminserver.controller;

import com.stageadminserver.adminserver.service.TypesService;
import com.stagecommon.common.pojo.RespBean;
import com.stagecommon.common.pojo.Types;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author: yxl
 * @since: 2022-05-14
 **/
@Slf4j
@RestController
@RequestMapping("/types")
public class TypesController {
    @Autowired
    private TypesService typesService;

    @PostMapping("/getAllTypes")
    public RespBean<List<Types>> getAllTypes(){
        return typesService.selectAllTypes();
    }
}
